<template>
  <div class="bottom">
    <div class="left"><span>客服</span><span>店铺</span><span>收藏</span></div>
    <div class="right">
      <span @click="addToCart">加入购物车</span><span @click="buy">购买</span>
    </div>
  </div>
</template>
<script>
export default {
  name: "DetailBottomBar",
  methods: {
    addToCart() {
      this.$emit("addCart");
    },
    buy() {
      console.log("buy");
    },
    
  },
};
</script>
<style scoped>
.bottom {
  background-color: #fff;
  width: 100%;
  height: 49px;
  /* position: relative; */
  /* bottom: 49px; */
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
}
.left,
.right {
  text-align: center;
  line-height: 49px;
  color: black;
  height: 100%;
  float: left;
  width: 50%;
  display: flex;
}
span {
  flex: 1;
  margin: 0;
}
.right {
  font-size: 18px;
}
.right span:first-child {
  background-color: yellow;
}
.right span:last-child {
  background-color: red;
  color: #fff;
}
</style>